<template>
	<view>
		<view class="zh1t1 mb30">
			<view class="bj_between mb40">
				<view class="bj_left">
					<image src="/static/page5/tx.png" class="zh1t1-mypic"></image>
					<view class="">
						<view class="f30 fwb mb20">
							{{user.user.nickname}}
						</view>
						<view class="f24">
							<text>{{$t("zh.tit1")}}</text>
							<text>{{user.user.jointime}}</text>
						</view>
					</view>
				</view>
				<image src="/static/page5/bj.png" class="zh1t1-bj" mode=""></image>
			</view>
			<view class="bj_between f30 mb20">
				<view>
					{{$t("zh.tit2")}}
				</view>
				<view class="zh1t1-inp bj_left">
					{{user.userId}}
				</view>
			</view>
			<view class="bj_between f30">
				<view>
					{{$t("zh.tit3")}}
				</view>
				<view class="zh1t1-inp bj_left">
					+55{{user.mobile}}
				</view>
			</view>
		</view>
		<myinfoVue class="mb40"></myinfoVue>
		<view class="bj_between mb40">
			<view class="f36">
				{{$t("zh.mt1")}}
			</view>
			<image src="/static/page5/xs.png" class="zh1t1-jt" :class="jtc" @click="opm"></image>
		</view>
		<view v-if="showm">
			<view class="bj_between mb20 f30" v-for="item in mlist">
				<view class="">
					{{item.name}}
				</view>
				<view class="">
					{{$t("menu.$")}} {{item.num}}
				</view>
			</view>
		</view>

	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue';
	import {
		onShow
	} from "@dcloudio/uni-app"
	import useI18n from '@/store/useI18n.js'
	import common from '../../js/common';
	import myinfoVue from "../zh/myinfo.vue";
	let user = ref({})
	onShow(function() {
		user.value = getApp().globalData.userInfo
	})
	const {
		t
	} = useI18n()
	let showm = ref(true)
	let jtc = ref("")
	let mlist = ref([{
			name: t("zh.mt2"),
			num: user.value.user.recharge_all
		},
		{
			name: t("zh.mt3"),
			num: user.value.user.withdraw_all
		},
		{
			name: t("zh.mt4"),
			num: user.value.user.bet_all
		},
		{
			name: t("zh.mt5"),
			num: user.value.user.bonus_all
		},
		{
			name: t("zh.mt6"),
			num: user.value.user.commission_all
		}
	])

	function opm() {
		if (showm.value) {
			showm.value = false
			jtc.value = "jtxz"
		} else {
			showm.value = true
			jtc.value = "jtxz2"
		}
	}
</script>

<style lang="scss" scoped>
	.zh1t1 {
		background: #00561D;
		border-radius: 20rpx;
		padding: 34rpx 20rpx;

		&-jt {
			width: 28rpx;
			height: 28rpx;
		}

		&-mypic {
			width: 88rpx;
			height: 88rpx;
			border-radius: 20rpx;
			margin-right: 30rpx;
		}

		&-bj {
			width: 32rpx;
			height: 32rpx;
		}

		&-inp {
			width: 462rpx;
			height: 64rpx;
			background: #001F0A;
			border-radius: 12rpx 12rpx 12rpx 12rpx;
			border: 2rpx solid #222869;
			padding-left: 20rpx;
		}
	}
</style>